package linuxbox.todo.logic;

import linuxbox.common.*;
import linuxbox.exception.*;
import linuxbox.BoxStatic;

public class BoxTodoCat
{
//There are system defined categories and user defined categories
  static final String module = "todo";
  static final String category = "Category";
  static final String name = "Category";

  public static boolean setUserCategories(BoxSession sec, String[] categories) throws
      LinuxboxException
  {
    return sec.setConfigStrings(module, category, name, categories);
  }

  public static String[] getUserCategories(BoxSession sec) throws LinuxboxException
  {
    return sec.getConfigStrings(module, category, name, false);
  }

  public static boolean setSystemCategories(String[] categories) throws
      LinuxboxException
  {
    BoxStatic.mainConfig.getModule(module).setConfigValues(category,name,categories);
    return true;
  }

  public static String[] getSystemCategories() throws LinuxboxException
  {
    return BoxStatic.mainConfig.getModule(module).getConfigValues(category,name);
  }
}
